import request from '@/utils/request'

export function getList(data) {
  console.log(data)
  return request({
    url: '/api/outbound_kuaiyun/order_list',
    method: 'get',
    params: {
      data_type: 3,
      limit: data.limit,
      page: data.page,
      outbound_order_sn: data.order_sn,
      material_code: data.material_code,
      start_time: data.start_time,
      end_time: data.end_time,
      bill_status: data.bill_status,
      print_status: data.print_status
    }
  })
}
export function postOutbound(str) {
  return request({
    url: '/api/order_sale/create_outbound',
    method: 'post',
    data: {
      order_sn_list: str
    }
  })
}
export function deleteOrders(str) {
  return request({
    url: '/api/order_sale/nullify',
    method: 'post',
    data: {
      ids: str
    }
  })
}
export function getMaterialList() {
  return request({
    url: '/api/material/material_fuzzy_search',
    method: 'get'
  })
}
export function getPostSaleList() {
  return request({
    url: '/sales/postSale/getList',
    method: 'get'
  })
}
export function changePrintStatus(outbound_order_ids) {
  return request({
    url: '/api/outbound_kuaiyun/change_print_data',
    method: 'post',
    data: {
      outbound_order_ids
    }
  })
}
